// 模拟数据配置
export const mockData = {
  // 首页轮播图
  bannerList: [
    '/static/images/banner/banner01.jpg',
    '/static/images/banner/banner02.jpg',
    '/static/images/banner/banner03.jpg'
  ],
  
  // 商品分类 - 使用实际存在的图片
  categories: [
    { id: 1, categoryName: '电子产品', categoryIcon: '/static/images/logo.png' },
    { id: 2, categoryName: '服装', categoryIcon: '/static/images/logo.png' },
    { id: 3, categoryName: '家居用品', categoryIcon: '/static/images/logo.png' },
    { id: 4, categoryName: '食品饮料', categoryIcon: '/static/images/logo.png' },
    { id: 5, categoryName: '食品类', categoryIcon: '/static/images/logo.png' },
    { id: 6, categoryName: '日用品类', categoryIcon: '/static/images/logo.png' },
    { id: 7, categoryName: '生鲜类', categoryIcon: '/static/images/logo.png' },
    { id: 8, categoryName: '酒水饮料类', categoryIcon: '/static/images/logo.png' },
    { id: 9, categoryName: '家居用品类', categoryIcon: '/static/images/logo.png' },
    { id: 10, categoryName: '个人护理类', categoryIcon: '/static/images/logo.png' },
    { id: 11, categoryName: '宠物用品类', categoryIcon: '/static/images/logo.png' },
    { id: 12, categoryName: '图书音像类', categoryIcon: '/static/images/logo.png' }
  ],
  
  // 商品列表 - 使用实际存在的图片，字段名与API响应匹配
  goodsList: [
    {
      id: 1,
      goodsName: '苹果 iPhone 15 Pro',
      introduce: '最新款iPhone，性能强劲',
      price: 7999,
      originPrice: 8999,
      imgUrl: '/static/images/banner/banner01.jpg',
      tagName: '热销,新品',
      sales: 1000
    },
    {
      id: 2,
      goodsName: '华为 Mate 60 Pro',
      introduce: '国产旗舰，拍照出色',
      price: 6999,
      originPrice: 7999,
      imgUrl: '/static/images/banner/banner02.jpg',
      tagName: '推荐',
      sales: 800
    },
    {
      id: 3,
      goodsName: '小米 14 Ultra',
      introduce: '性价比之王',
      price: 5999,
      originPrice: 6999,
      imgUrl: '/static/images/banner/banner03.jpg',
      tagName: '限时',
      sales: 600
    },
    {
      id: 4,
      goodsName: 'OPPO Find X7',
      introduce: '轻薄时尚',
      price: 4999,
      originPrice: 5999,
      imgUrl: '/static/images/logo.png',
      tagName: '新品',
      sales: 400
    }
  ],
  
  // 购物车数据 - 使用实际存在的图片
  cartList: [
    {
      shopId: 1,
      shopName: '官方旗舰店',
      shopTag: '正品保证',
      shopActivity: '满100减10',
      items: [
        {
          id: 1,
          productName: '苹果 iPhone 15 Pro',
          productImage: '/static/images/banner/banner01.jpg',
          price: 7999,
          quantity: 1,
          checked: true,
          skuText: '256GB 深空黑色',
          activityTags: ['热销', '新品'],
          coupon: '满减券'
        }
      ]
    }
  ],
  
  // 用户信息
  userInfo: {
    id: 1001,
    username: 'testuser',
    nickname: '测试用户',
    avatar: '/static/images/profile.jpg',
    phone: '138****8888'
  },
  
  // 秒杀活动数据
  seckillList: [
    {
      id: 1,
      name: '金秋9月秒杀活动',
      startTime: '2024-09-01 08:00:00',
      endTime: '2024-09-30 23:59:59',
      timeSlots: ['8:00', '10:00', '20:00'],
      status: 'online', // online: 上线, offline: 下线
      createTime: '2024-08-15 10:00:00',
      updateTime: '2024-08-15 10:00:00',
      productCount: 5
    },
    {
      id: 2,
      name: '双11预热秒杀',
      startTime: '2024-11-01 00:00:00',
      endTime: '2024-11-10 23:59:59',
      timeSlots: ['9:00', '12:00', '15:00', '18:00'],
      status: 'offline',
      createTime: '2024-10-20 14:30:00',
      updateTime: '2024-10-20 14:30:00',
      productCount: 8
    },
    {
      id: 3,
      name: '年终大促秒杀',
      startTime: '2024-12-20 00:00:00',
      endTime: '2024-12-31 23:59:59',
      timeSlots: ['10:00', '14:00', '19:00'],
      status: 'online',
      createTime: '2024-12-01 09:15:00',
      updateTime: '2024-12-01 09:15:00',
      productCount: 12
    }
  ],
  
  // 秒杀活动详情
  seckillDetail: {
    id: 1,
    name: '金秋9月秒杀活动',
    startTime: '2024-09-01 08:00:00',
    endTime: '2024-09-30 23:59:59',
    timeSlots: ['8:00', '10:00', '20:00'],
    status: 'online',
    description: '金秋九月，各种商品超低价秒杀，机会难得！',
    products: [
      {
        id: 1,
        productName: '真空吸尘器',
        originalPrice: 1288.00,
        seckillPrice: 644.00,
        discountType: 'discount', // discount: 折扣, discountPrice: 折扣价
        discountValue: 5, // 5折
        stock: 100,
        soldCount: 45
      },
      {
        id: 2,
        productName: '智能手表',
        originalPrice: 899.00,
        seckillPrice: 449.50,
        discountType: 'discount',
        discountValue: 5,
        stock: 50,
        soldCount: 20
      },
      {
        id: 3,
        productName: '无线耳机',
        originalPrice: 299.00,
        seckillPrice: 149.50,
        discountType: 'discount',
        discountValue: 5,
        stock: 200,
        soldCount: 150
      }
    ]
  }
}

// 模拟API响应
export const mockResponse = (data, code = 200, msg = '操作成功') => {
  return {
    code,
    msg,
    data,
    timestamp: Date.now()
  }
}

// 模拟延迟
export const mockDelay = (ms = 500) => {
  return new Promise(resolve => setTimeout(resolve, ms))
} 